<?php
namespace app\common\validate;

use think\Validate;

class UserDonate extends Validate
{
    protected $rule =   [
        'images'  => 'require',
        'price'  => 'require',
        'is_new'  => 'require',
//        'province'  => 'require',
        'city'  => 'require',
//        'area'  => 'require',
        'address'  => 'require',
        'mobile'  => 'require|length:11|number',
        'uid'  => 'require',
        'name'  => 'require',

    ];

    protected $message  =   [
        'price.require' => '价格必须',
        'images.require' => '图片必须',
        'is_new.require' => '新旧程度必须',
        'mobile' => '手机号不合法',
//        'mobile.length' => '手机号不合法',
//        'province.require' => '省必须',
        'city.require' => '省/市/区必须',
//        'area.require' => '区必须',
        'address.require' => '详细地址必须',
        'uid.require' => '捐赠方已下架',
        'name.require' => '物资名字不能为空',

    ];
}